﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace canyinguanlixitong
{
    public partial class frm供货商 : Form
    {
        public frm供货商()
        {
            InitializeComponent();
        }
        string str = "Data Source=.;Initial Catalog=Supermarket management system;Integrated Security=True";
     //确定
        public string stu;
        private void button1_Click(object sender, EventArgs e)
        {
            stu = this.dgvqw1.SelectedCells[1].Value.ToString();
            this.Close();
        }
        public void jiazai()
        {
            SqlConnection conn = new SqlConnection(str);
            conn.Open();
            string sql = "select id,idquan,appone,phone,beizhu from dbo.jinguocaigou";
            DataSet ds = new DataSet("Student");
            SqlDataAdapter asdf = new SqlDataAdapter(sql, conn);
            asdf.Fill(ds, "Student");
            dgvqw1.DataSource = ds.Tables["Student"];

        }
        private void frm供货商_Load(object sender, EventArgs e)
        {
            jiazai();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
